<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddLiveMeetingRoom extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('live_meeting_room', function (Blueprint $table) {
            $table ->increments('id') ->comment('直播间表');
            $table ->string('room_name') ->nullable() ->comment('直播间名称');
            $table ->text('intro')->nullable() ->comment('介绍');
            $table ->integer('live_admin_id') ->default('0') ->comment('主播人');
            $table ->string('room_user_no') ->nullable() ->comment('主播编号');
            $table ->string('list_img') ->nullable() ->comment('列表图片');
            $table ->string('room_secret') ->nullable() ->comment('房间密钥');
            $table ->string('room_no') ->nullable() ->comment('房间号');
            $table ->string('windows_publish_stream_id') ->nullable() ->comment('流id');
            $table ->string('audio_publish_stream_id') ->nullable() ->comment('音频流');
            $table->text('token')->nullable()->comment('token');
            $table ->timestamp('token_expiration_time') ->nullable()->comment('token过期时间');
            $table ->integer('time_long')->default('0')->comment('会议时长（秒）');
            $table ->tinyInteger('room_num_limit')->default('0') ->comment('房间人数（上限200）');
            $table ->tinyInteger('online_user_num')->default('0') ->comment('房间当前在线人数');
            $table ->tinyInteger('status')->default('0') ->comment('直播状态，未启用0，启用1');
            $table ->timestamps();
            $table ->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('live_meeting_room', function (Blueprint $table) {
            //
        });
    }
}
